NumericCircularBufferEx

Ecng.Collections

CircularBuffer with additional features for numeric types. Uses INumber operators for calculations.

Herda de: CircularBuffer<T>

Implementa: ICircularBufferEx<T>, ICircularBuffer<T>, IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable

Construtores

NumericCircularBufferEx
public NumericCircularBufferEx(int capacity)
numericCircularBufferEx = NumericCircularBufferEx(capacity)

Initializes a new instance of the NumericCircularBufferEx.

capacity
Capacity.

Propriedades

Capacity
public override int Capacity { get; set; }
value = numericCircularBufferEx.Capacity
numericCircularBufferEx.Capacity = value

Maximum capacity of the buffer.

Item
public override TItem Item { get; set; }
value = numericCircularBufferEx.Item
numericCircularBufferEx.Item = value

Gets the IPoint at the specified index, which merges the X,Y and higher order values into a single point

Max
public NullableEx<TItem> Max { get; private set; }
value = numericCircularBufferEx.Max
numericCircularBufferEx.Max = value

Max value.

Min
public NullableEx<TItem> Min { get; private set; }
value = numericCircularBufferEx.Min
numericCircularBufferEx.Min = value

Min value.

Stats
public CircularBufferStats Stats { get; set; }
value = numericCircularBufferEx.Stats
numericCircularBufferEx.Stats = value

Specifies which statistics to calculate.

Sum
public TItem Sum { get; private set; }
value = numericCircularBufferEx.Sum
numericCircularBufferEx.Sum = value

Sum of all elements in buffer.

SumNoFirst
public TItem SumNoFirst { get; }
value = numericCircularBufferEx.SumNoFirst

Sum of all elements in buffer without the first element.

Métodos

Clear
public override void Clear()
numericCircularBufferEx.Clear()

Reset state.

PopBack
public override void PopBack()
numericCircularBufferEx.PopBack()

Removes the element at the back of the buffer. Decreasing the Buffer size by 1.

PopFront
public override void PopFront()
numericCircularBufferEx.PopFront()

Removes the element at the front of the buffer. Decreasing the Buffer size by 1.

PushBack
public override void PushBack(TItem item)
numericCircularBufferEx.PushBack(item)

Pushes a new element to the back of the buffer. Back()/this[Size-1] will now return this element. When the buffer is full, the element at Front()/this[0] will be popped to allow for this new element to fit.

item
Item to push to the back of the buffer
PushFront
public override void PushFront(TItem item)
numericCircularBufferEx.PushFront(item)

Pushes a new element to the front of the buffer. Front()/this[0] will now return this element. When the buffer is full, the element at Back()/this[Size-1] will be popped to allow for this new element to fit.

item
Item to push to the front of the buffer